home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 05.zip
/
BS1 part 5
/
IM_Install3.adf
/
piarc.LZH
/
imfc24r.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1992-05-05
|
4KB
|
146 lines
/*
* imfc24r.rexx
*
* Written by: Barry Chalmers and Ben Williams
* Last Update: April 20th, 1992
* For: Black Belt Systems image processing series IM, IM F/c, and IP.
* ---------------------------------------------------------------------------
* Revision: 1.02 - see ReadMe file for details on changes to this level
* 1.03 - passed in parameters for selective redraw
* and two monitor operation
*/
/*
* Default display modes - These are used when this is called with
* selective redraw parameters
*/
def_overscan = 0; /* 0 = non-overscan, 1 = overscan */
def_fcres = 3; /* 0 = 384x482, 1 = 512x482, 2 = 768x482, 3 = 1024x482 */
def_twomonitor = 1; /* 0 = one screen, 1 = using a second screen */
parse arg jackin dx1 dy1 dx2 dy2
if jackin = 'finish' then do
exit 0;
end;
/*
* open rexxsupport.library -- needed for some functions
*/
if ~show('L',"rexxsupport.library") then do
if addlib('rexxsupport.library',0,-30,0) then do
/* everything's ok */
end;
else do
say 'We Have A Library Problem, Unable To Load "rexxsupport.library"';
say 'Cannot operate script without this library - sorry!';
exit 10;
end;
end;
/*
* This will automatically direct the script to the proper
* software, if it is running.
*/
prtnme = 'IP_Port'; /* assume Image Professional */
if show('P','IP_Port') = 0 then do
if show('P','IM_Port') = 0 then do
say "Can't find image processor's ARexx port!!!"; /* not running? */
say "This script requires IP, IM or IM F/c to run!";
exit(20);
end;
else do
prtnme = 'IM_Port'; /* That's the thing about assumptions... */
end; /* We make em, user's break em. */
end;
/*
* This code attempts to read a file called "picmdpath" from REXX:
* If it can't find it, the script will assume that the commands
* associated with this PI Module are in "c:". If the file exists,
* the script will look in the path that is specified in the file.
* If you create this file, you MUST put a complete, correct path
* in it; if the commands are in a sub-directory, you have to put
* the trailing slash on the path (like, device:dir/).
*
*/
cmdpath = 'c:';
if open(fhandle,'rexx:picmdpath','read') then /* open the file */
do
cmdpath = readln(fhandle);
call close(fhandle); /* close the file */
end
address(prtnme);
if jackin > 0 then do
overscan = def_overscan;
fcres = def_fcres;
twomonitor = def_twomonitor;
end;
else do
options results;
'askyn "Overlay Mode","Using a Second Monitor"';
twomonitor = result;
options;
options results;
'askyn "Display Non- Overscan","Display Overscan"';
overscan = result;
options;
options results;
'gadgets "Lo-Res","384x482","Med-Res","512x482","Med-Res","768x482","Hi-Res","1024x482"';
fcres = result;
options;
if fcres = 0 then do
address;
exit 0;
end
fcres = fcres - 1;
'wbtofront';
options results;
'jackin';
jackin = result;
options;
end;
/* Although XSTART and YSTART are optional */
/* (IMFC24 centers them when defaulting), you will probably want */
/* to set XSTART at least, for your Amiga and preferences. */
/* A good guess for YSTART is 40. */
if fcres = 0 then do
xstart = 40;
ystart = 40;
end
if fcres = 1 then do
xstart = 56;
ystart = 40;
end
if fcres = 2 then do
xstart = 78;
ystart = 40;
end
if fcres = 3 then do
xstart = 104;
ystart = 40;
end
/* USAGE for the IMFC24 program is */
/* IMFC24 <jackin> [fcres] [overscan] [xstart] [ystart] [twomonitor] [dx1] [dy1] [dx2] [dy2] */
/* Default is */
/* IMFC24 - 0 0 (center) (center) */
address command cmdpath||'imfc24 '||jackin||' '||fcres||' '||overscan||' '||xstart||' '||ystart||' '||twomonitor||' '||dx1||' '||dy1||' '||dx2||' '||dy2;
address(prtnme);
'tofront';
'FCREDRAW';
'finish';
address;
exit 0;